#include "stdio.h"
#include "unistd.h"
#include "time.h"
#include "user_include.h"

void user_command_task(void *ignore)
{

    while (1)
    {
        if (wifi_info_flag.valid == 255) {
            printf("%s %d ssid:%s password:%s\r\n", __func__, __LINE__, \
                wifi_info_flag.ssid, wifi_info_flag.pwd);
            // wifi_param_set(wifi_info_flag.ssid, wifi_info_flag.pwd);
            user_wifi_cmd_sta_join((const char *)wifi_info_flag.ssid, (const char *)wifi_info_flag.pwd);
            wifi_info_flag.valid = 254;
        }

        if (mqtt_info_flag.valid == 255) {
            printf("%s %d server:%s port:%ld\r\n", __func__, __LINE__, \
                mqtt_info_flag.server, mqtt_info_flag.port);
            mqtt_info_flag.valid = 254;
        }
        vTaskDelay(100);
    }
    
}